var mapIds = [867201110];
var 准备地图 = 867201000;

function init() {}

function setup(c, a) {
    em.setProperty("state", 1);
    em.setProperty("leader", "true");
    var c = em.newInstance("莫奈德_地图_Act2.1_收集野狼肉");
    for (var b = 0; b < mapIds.length; b++) {
        var d = c.setInstanceMap(mapIds[b])
    }
    return c
}

function onItemPickedUp(c, b, d) {
    var a = b.getItemAmount(d);
    if (d == 4036383) {
        if (a == 5) {
            b.getAPI().addPopupSay(9400582, 3000, "#face0#真是的，巴特勒为啥那么讨厌我？平白无故地就拿我撒气！", "", 0);
            b.getAPI().addPopupSay(9400582, 3000, "#face0#是因为我这部下太优秀了，所以看我不顺眼吗？嗯，这个理由最说得通。", "", 0)
        } else {
            if (a == 15) {
                b.getAPI().addPopupSay(9400582, 3000, "#face0#“谁再敢↘对↗我的命令有异议，↗均视作↘不服从军令↗~~~，他肯定觉得自己这么说特有威严！", "", 0);
                b.getAPI().addPopupSay(9400583, 3000, "#face0#凯恩！周围人都听见你在吐槽咯。", "", 0);
                b.getAPI().addPopupSay(9400582, 3000, "#face0##h0#，看见了吧？做当红小生不容易啊，大家都在关注我的一言一行呢。", "", 0);
                b.getAPI().addPopupSay(0, 3000, "#b……", "", 0)
            } else {
                if (a == 25) {
                    b.getAPI().addPopupSay(9400582, 3000, "#face0#我要最快完成任务，挫挫巴特勒的威风！", "", 0)
                } else {
                    if (a == 35) {
                        b.getAPI().addPopupSay(0, 3000, "#b你为什么这么讨厌巴特勒副团长？", "", 0);
                        b.getAPI().addPopupSay(9400582, 3000, "#face0#因为他做指挥官不够格！", "", 0);
                        b.getAPI().addPopupSay(9400582, 3000, "#face0#亚皮纳斯骑士的形象都给他搞砸了！", "", 0);
                        b.getAPI().addPopupSay(9400582, 3000, "#face0#更可恶的是，就因为年纪小这一理由，他不给艾丽卡应有的尊重，不把她当学者看待。", "", 0);
                        b.getAPI().addPopupSay(0, 3000, "#b这才是真正的原因。", "", 0);
                        b.getAPI().addPopupSay(9400582, 3000, "#face0#才不是！你不也领教过他的蛮横无理吗？", "", 0)
                    } else {
                        if (a == 50) {
                            b.getAPI().addPopupSay(9400582, 3000, "#face0#完事了！走吧！", "", 0)
                        }
                    }
                }
            }
        }
    }
}

function onPlayerRegistered(b, a) {
    a.setReviveCount(-100);
    b.startEventTimer(30 * 60 * 1000)
}

function onPlayerRevived(b, a) {
    return false
}

function onMapChanged(c, b, a) {
    if (mapIds.indexOf(a) < 0) {
        on玩家退场(c, b, false);
        return
    }
    em.setProperty("kill", "0");
    em.setProperty("clear", "0");
    em.setProperty("curMap", a)
}

function onPlayerDisconnected(b, a) {
    on玩家退场(b, a, false);
    return 0
}

function onTimeOut(a) {
    a.getPlayers().forEach(function (b) {
        on玩家退场(a, b, true)
    })
}

function onMonsterKilled(a, b) {}

function onPlayerRevived(b, a) {
    return false
}

function onPartyDisbanded(a) {}

function onPlayerKilled(b, a) {}
var setupTask;

function randomNum(b, a) {
    switch (arguments.length) {
        case 1:
            return parseInt(Math.random() * b + 1, 10);
            break;
        case 2:
            return parseInt(Math.random() * (a - b + 1) + b, 10);
            break;
        default:
            return 0;
            break
    }
}

function initProp(a, b) {
    if (em.getProperty(a) == null) {
        em.setProperty(a, b)
    }
}

function initPropArray(a, d, c, e) {
    for (var b = c; b <= e; b++) {
        if (em.getProperty(a + "_" + b) == null) {
            em.setProperty(a + "_" + b, d)
        }
    }
}

function on玩家退场(c, b, a) {
    c.disposeIfPlayerBelow(a ? 999 : 0, 准备地图);
    em.getProperties().clear();
    em.setProperty("state", 0);
    em.setProperty("leader", "true");
    c.unregisterPlayer(b)
};